<?php

use Biz\service\ShopClassify as sShopClassify;
use Biz\service\trade\UserAddress;

/**
 * @deprecated
 */
class GoodsListAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    public function main()
    {
        $categoryId = $this->getRequest()->getQuery('category_id', 0);
        $sortType = $this->getRequest()->getQuery('sort_type', 0);
        $params = $this->getRequest()->getQuery("params", "{}");
        $params = json_decode($params, true);
        $page = $this->getRequest()->getQuery('page', 1);
        $areaCode = UserAddress::getUserDefaultCityCode($this->uid);

        $data = sShopClassify::goodsListByFilter($categoryId, $sortType, $params, $page, $areaCode);
        $this->setSuccess($data);
    }
}